<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SK43 TokTok Project</title>
<script>
function check(){
	var id=loginform.mem_id.value;
	var pass=loginform.mem_pw.value;
	
	if(id.length == 0){
		alert("아이디를 입력하세요.");
		loginform.id.focus();
		return false;
	}
	if(pass.length == 0){
		alert("비밀번호를 입력하세요.");
		loginform.password.focus();
		return false;
	}
	
	loginform.submit();
}
</script>
</head>
<body>
<!-- 인증되지 않은 사용자는 로그인 화면 제공 -->
<c:if test="${empty sessionScope.Member}"> 
  <form action="memberlogin.do" method="post" name="loginform">
  <table background="../images/hrmmain<%=(int)(Math.random()*2) %>.jpg" width="1024" border="0">
    <tr>
      <td height="333px" width="658px">&nbsp;</td>
      <td width="100px">&nbsp;</td>
      <td width="100px">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="20">&nbsp;</td>

      <td><c:if test="${empty sessionScope.mem_id}"> 
	      <input type="text" name="mem_id" size="19"></input>
	    </c:if>
	    <c:if test="${!empty sessionScope.mem_id}"> 
	     <input type="text" name="mem_id" size="19" value=${sessionScope.mem_id}></input>
	    </c:if>
	    
	   </td>
      <td rowspan="2"><img src="../images/layer_btm.gif" width="100px" height="40" style="border:0;cursor:hand" onclick="check()"/></td>
      <td width="100">&nbsp;</td>
    </tr>
    <tr>
      <td height="20">&nbsp;</td>
      <td><input type="password" name="mem_pw" size="21"></input></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="398">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </form>
   </c:if>
   
<!-- 인증된 사용자에게 제공되는 화면 -->
<c:if test="${!empty sessionScope.Member}" > 
<jsp:forward page = "main"/>
</c:if>

<div style="position:absolute;left:697px;top:238px;width:50px;width:50px; visibility:transparent " >
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="50px" height="50px">
 <param name="movie" value="../images/bf.swf"/>
 <param name="quality" value="high"/>
 <param name="wmode" value="transparent"/>
 <embed src="../images/bf.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="50px" height="50px"></embed>
</object>
</div>   
  
 
</body>
</html>